<template>
  <div class="card br-15">
    <div class="card-head" :style="{ background: item.bgColor }">{{ item.title }}</div>
    <div class="card-content">
      <div class="card-content-item" v-for="(option, index) in item.content" :key="index">
        <svg-icon :icon-class="option.icon"></svg-icon>
        <div>
          <h5>{{ option.title }}</h5>
          <p>{{ option.description }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'IndexCard',
  props: ['item']
}
</script>

<style scoped lang="less">
.card {
  margin-right: 15px;
  background: #fff;
  overflow: hidden;
  //min-width: 402px;
  flex: auto;
  box-sizing: border-box;
  &:last-child {
    margin-right: 0;
  }
  &-head {
    color: #fff;
    font-size: 14px;
    padding: 7px 28px;
    line-height: 20px;
  }
  &-content {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 9px;
    place-content: space-between;
    background: #fff;
    //height: 240px;
    //min-width: 274px;
    padding: 21px 18px;
    box-sizing: border-box;
    &-item {
      background: #f6f7f9;
      box-sizing: border-box;
      padding: 18px 0 25px 16px;
      //min-width: 176px;
      display: flex;
      justify-content: flex-start;
      .svg-icon {
        font-size: 30px;
        margin-right: 14px;
      }
      h5 {
        font-size: 14px;
        line-height: 23px;
        color: #000;
        margin: 0;
      }
      p {
        margin: 0;
        font-size: 12px;
        line-height: 20px;
        color: rgba(0, 0, 0, 0.5);
      }
    }
  }
}
</style>
